<style lang="scss" rel="stylesheet/scss">
    .j-comment-input{
        .out-input-div {
            position: fixed;
            top: 0;
            bottom: 51px;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.2);
            z-index: 100;
        }
        .comment-input-div {
            z-index: 100;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            border-top: 1px solid #f5f5f5;
        }

    }
</style>
<template>
    <div class="j-comment-input">
        <div class="out-input-div" @click="bindClose"></div>
        <div class="comment-input-div">
            <van-field
                v-model="message"
                type="textarea"
                placeholder="请输入"
                rows="1"
                autosize>
                <van-button slot="button" size="small" type="primary" @click="bindSendMsg">发送</van-button>
            </van-field>
        </div>
    </div>
</template>

<script>
    export default {
        props: ['show'],
        data () {
            return {
                message: '',
            }
        },
        props: {
            userinfo:{
                type:Object
            }
        },
        created () {

        },
        methods: {
            bindSendMsg() {
                if(this.message) {
                    this.$emit('bindSendMsg',this.message)
                }else {
                    xmview.showToast('请输入内容哦~')
                }
            },
            bindClose() {
                this.$emit('bindClose')
            }
        }
    }
</script>

